import static org.junit.Assert.*;

import org.junit.Test;

public class GUITest {
  
  GUI gui = new GUI();
  @Test
  public void testFile(){
  CalendarEvent event = new CalendarEvent("Study", "20140813", "20140813", "1000",
      "1300", "(-10:00) Hawaiian Time", "Studying for Exam", "At home", "PUBLIC", 1,
      "\r\nRRULE:FREQ=WEEKLY;BYDAY=SU,MO,WE,SA","83.6548;-122.8065");
  event.write();
  }
  @Test
  public void testGUI() {
    assertNotNull(gui);
  }  
  
  /**
   * Test to see that the isValidDate method returns true for valid dates
   */
  @Test
  public void testIsValidDate() {  
    assertTrue(gui.isValidDate("20140201", "yyyyMMdd")); 
  }
  
  /**
   * Test to see that the isValidDate method returns false for invalid dates
   */
  @Test
  public void testInvalidDate() {  
    assertFalse(gui.isValidDate("20140230", "yyyyMMdd")); 
  }
}
